﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemDoc_docmanage_upload.aspx.cs" Inherits="Ccit.OA.SystemDoc.SystemDoc_docmanage_upload" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>文件上传</title>
    <script type="text/javascript" language="javascript">
	     function FilterChange()
	     {
	            var oTitle = document.getElementById("tbTitle");
	            var oFile = document.getElementById("MyFile").value;
	            var iPostion = oFile.lastIndexOf("\\");
	            if ( iPostion != -1 )
	            {
	                var oFileName = oFile.substring((iPostion + 1),(oFile.length));
	            }
	            
	            if ( oTitle.value == "")
	               oTitle.value = oFileName;   
	     }	
	     
	     function doUpload()
	     {
	        if(document.getElementById("MyFile").value == "")
	        {
	            alert("请先选择要上传的文件!");
	            return false;
	        }
	        return true;
	     }
    </script>
</head>
<body>
     <Form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager> 
		<table class="tableborder" cellpadding="0" cellspacing="0" border="0" width="98%" align="center">
			<tr id="tr1" runat=server>
			    <td style="width:100%" colspan="2">
			        <table width="100%" border="0" cellpadding="0" cellspacing="0">
			         <tr>
	                    <td class="pformleft" width="50%" align="left">文档类型 <asp:Label ID="lbType" runat="server"></asp:Label></td>
				        <td class="pformright" width="48%" align="left">
					        <nobr>文档编号 <input class="input" style="width:75%" type="text" id="txtNumbers" runat="server" title="按照设置的编码规则自动生成" /></nobr>
				        </td>
			         </tr>
			        </table>
			    </td>
			</tr>
			<tr id="trTitle" runat=server>
				<td class="pformleft" width="10%" align="center">文档标题</td>
				<td class="pformright" width="90%" align="left">
					<asp:TextBox ID="tbTitle" Runat="server" CssClass="input" Width="98%"></asp:TextBox>
				</td>
			</tr>
			<tr>
				<td class="pformleft" align="center" width="10%"><nobr>附件选择</nobr></td>
				<td class="pformright" width="90%" align="left">
					<input type="file" id="MyFile" onpropertychange="FilterChange()" runat="server" style="WIDTH:98%" />
				</td>
			</tr>
			<tr>
				<td class="pformleft" align="center" width="10%"><nobr>备 注</nobr></td>
				<td class="pformright" width="90%" align="left">
			       <asp:TextBox CssClass="input" ID="txtremark" runat="server" Width="98%"
                        Height="102px" TextMode="MultiLine"></asp:TextBox>
				</td>
              
			</tr>
			
			<tr class="pformstrip">
				<td align="center" colspan="2">
					<asp:Button id="btnConfirm" CssClass="button" Runat="server" Text="上传" 
                        onclick="btnConfirm_Click"></asp:Button>
					&nbsp;&nbsp;
					<asp:Button ID="btnCancel" CssClass="button" Runat="server" Text="返回" 
                        onclick="btnCancel_Click" Visible="False"></asp:Button>
					&nbsp;&nbsp;
					</td>
			</tr>
		</table>
     </Form>
</body>
</html>
